﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EIS_desktop
{
  
    public partial class monyear : UserControl
    {
        private  string _month;
        private int _year;

        [Category("MonthYear")]
        [Description("MyContolProperties")]
        public string Month
        {
            get { return _month; }
            set { _month = value; }
        }
        [Category("MonthYear")]
        [Description("MyContolProperties")]
        public int Year
        {
            get { return _year; }
            set { _year = value; }
        }
        public monyear()
        {
            InitializeComponent();
        }

        private void monyear_Load(object sender, EventArgs e)
        {
            tableLayoutPanel1.Hide();
            for (int year = 1970; year <= 2030; year++)
            {
                comboBox1.Items.Add(year);
            }
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            tableLayoutPanel1.Show();
        }

        private void textBox1_Click(object sender, EventArgs e)
        {
            TextBox txt =(TextBox) sender; 
            _month = txt.Text;
            tableLayoutPanel1.Hide();
        }

        public delegate void MonthYearSelectHandler(object sender, EventArgs   e);
        [Category("MyEvent")]
        public event MonthYearSelectHandler MonthYearSelected
        {
            add 
            {
                

            }
            remove { }
        }
       
    }
}
